# -*- coding:utf-8 -*-
def reindent(s , num_space):
	"""使每行缩进相同空格"""
	leading_space = num_space * ' '
	lines = [leading_space + line.strip() for line in s.splitlines()]
	return '\n'.join(lines)
if __name__ == '__main__':
	s = """test1
	test2
		test3
			test4
	"""
	print reindent(s,4)
